import sequelize from "../../db/dbConnext";
import { option } from "../../db/commomConfig";
import { DataTypes } from "sequelize";
import SysDictDataEntity from "../../../entities/system/SysDictDataEntity";

export type ISysDictData = Omit<SysDictDataEntity, "validateThis" | "id">;

const SysDictDataModel = sequelize.define<any, ISysDictData>(
  "sys_dict_data",
  {
    dictSort: {
      type: DataTypes.INTEGER,
      allowNull: true,
    },
    dictLabel: {
      type: DataTypes.STRING,
      allowNull: true,
    },
    dictValue: {
      type: DataTypes.STRING,
      allowNull: true,
    },
    dictType: {
      type: DataTypes.STRING,
      allowNull: true,
    },
    classType: {
      type: DataTypes.STRING,
      allowNull: true,
    },
    listClass: {
      type: DataTypes.STRING,
      allowNull: true,
    },
    isDefault: {
      type: DataTypes.STRING,
      allowNull: true,
    },
    status: {
      type: DataTypes.STRING,
      allowNull: true,
    },
    remark: {
      type: DataTypes.STRING,
      allowNull: true,
    },
  },
  option
);
export default SysDictDataModel;
